<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateGoodsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('goods', function (Blueprint $table) {
            $table->increments('id');
            $table->string('title')->comment('商品名称');
            $table->decimal('price', 6, 2)->comment('商品的价格');
            $table->decimal('oldprice',6,2)->comment('商品原价');
            $table->string('size')->comment('商品编码');
            $table->string('star')->comment('商品评分');
            $table->string('version')->comment('版本');
            $table->string('relevance')->comment('关联商品');
            $table->string('color')->comment('颜色');
            $table->integer('kucun')->comment('库存');
            $table->text('detail')->comment('详情');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::drop('goods');
    }
}
